package mengmeng.oneday.com.cn.smallworlda.view.activity;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.widget.FrameLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;
import mengmeng.oneday.com.cn.smallworlda.R;
import mengmeng.oneday.com.cn.smallworlda.base.BaseActivity;
import mengmeng.oneday.com.cn.smallworlda.utils.FragmentTabUtils;
import mengmeng.oneday.com.cn.smallworlda.view.fragment.CompetitiveProductFragment;
import mengmeng.oneday.com.cn.smallworlda.view.fragment.FirstPageFragment;

public class MainActivity extends BaseActivity {
    @BindView(R.id.main_fragment_container)
    FrameLayout mainFragmentContainer;
    @BindView(R.id.radioButton_firstPage)
    RadioButton radioButtonFirstPage;
    @BindView(R.id.radioButton_competitiveProduct)
    RadioButton radioButtonCompetitiveProduct;
    @BindView(R.id.radioButton_brandDiscount)
    RadioButton radioButtonBrandDiscount;
    @BindView(R.id.radioButton_mine)
    RadioButton radioButtonMine;
    @BindView(R.id.radioGroup_main)
    RadioGroup radioGroupMain;

    @Override
    public int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    public void initView() {
        getSupportActionBar().hide();
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(CompetitiveProductFragment.newInstance());
        fragments.add(FirstPageFragment.newInstance());
        fragments.add(CompetitiveProductFragment.newInstance());
        fragments.add(FirstPageFragment.newInstance());
        new FragmentTabUtils(getSupportFragmentManager()
                , fragments
                , R.id.main_fragment_container
                ,radioGroupMain)
                .setDefaultPostion(0);
    }
}
